const state = {
  jianhuApplyDto: null,
  active: 0,
  imgDto: null,
  cxtInfo: null,
  businessDto: null,
  jianhuDto: null
}

const mutations = {
  SET_JIAN_HU_APPLY_DTO: (state, data) => {
    state.jianhuApplyDto = data
  },
  SET_ACTIVE: (state, data) => {
    state.active = data
  },
  SET_IMG_DTO: (state, data) => {
    state.imgDto = data
  },
  SET_CXT_INFO: (state, data) => {
    state.imgDto = data
  },
  SET_BUSINESS_DTO: (state, data) => {
    state.businessDto = data
  },
  SET_JIANHU_DTO: (state, data) => {
    state.jianhuDto = data
  },
  SET_EMPTY: (state, data) => {
    state.jianhuDto = data
    state.jianhuApplyDto = data
    state.active = 0
    state.imgDto = data
    state.cxtInfo = data
    state.businessDto = data
  }
}

const actions = {
  setJianhuApplyDto({ commit }, data) {
    commit('SET_JIAN_HU_APPLY_DTO', data)
  },
  setActive({ commit }, data) {
    commit('SET_ACTIVE', data)
  },
  setImgDto({ commit }, data) {
    commit('SET_IMG_DTO', data)
  },
  setCxtInfo({ commit }, data) {
    commit('SET_CXT_INFO', data)
  },
  setBusinessDto({ commit }, data) {
    commit('SET_BUSINESS_DTO', data)
  },
  setJianhuDto({ commit }, data) {
    commit('SET_JIANHU_DTO', data)
  },
  setEmpty({ commit }, targetUser) {
    commit('SET_EMPTY', targetUser)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
